#vim: noexpandtab
CC= gcc
CFLAGS= -Wall -g
LFLAGS= -Wall -g

OBJS= rsrcmanager.o test.o ../chainedlib/chainedlist.o ../log/log.o

EXE= test

include ../arch.mk

LIBS=
include $(addsuffix libs.mk, $(dir $(OBJS)))

CCDV= ../ccdv

all: $(EXE) $(CCDV)
$(EXE): $(OBJS)
	@$(CCDV) $(CC) $(LFLAGS) $(LIBS) $(OBJS) -o $(EXE)

$(CCDV):
	@( cd ../_ccdv; $(MAKE))

.c.o:
	@$(CCDV) $(CC) $(CFLAGS) $< -c -o $@

.PHONY: clean
clean:
	rm -f $(OBJS) $(EXE)

.PHONY: distclean
distclean:
	rm -f $(OBJS)
